package com.zkthink.ceres.promotion.dao;

import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.ceres.promotion.entity.SalesOwnProduct;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SalesOwnProductMapper extends SuperMapper<SalesOwnProduct> {

    SalesOwnProduct selectByMidAndProductId(@Param("mid") Long mid, @Param("productId") Long product_id);

    //查询分销者的产品库的数量 is_delete=0;
    List<SalesOwnProduct> selectByMid(@Param("mid") Long mid);

    //查询分销者的删除的产品库的数量 is_delete=1;
    List<SalesOwnProduct> selectByMidAndIsDelete(@Param("mid") Long mid);

    int deleteByid(Long id);

    void updateIsDeleteById(Long id);


}
